/** DGui project file.

Copyright: Trogu Antonio Davide 2011-2013

License: $(HTTP boost.org/LICENSE_1_0.txt, Boost License 1.0).

Authors: Trogu Antonio Davide
*/

/*
 * Notes:
 * - ToolTip Messages are Commented.
 * - RichEdit Text Styles are Commented.
 */

module dguihub.core.winapi;

public import core.sys.windows.windows;
public import core.sys.windows.com;

extern (Windows) {
   enum : int {
      I_CHILDRENCALLBACK = -1,
      LPSTR_TEXTCALLBACKW = -1,
   }

   enum {
      SW_INVALIDATE = 2,
   }

   /* Dialog codes */
   enum : uint {
      DLGC_WANTARROWS = 1,
      DLGC_WANTTAB = 2,
      DLGC_WANTALLKEYS = 4,
      DLGC_WANTMESSAGE = 4,
      DLGC_HASSETSEL = 8,
      DLGC_DEFPUSHBUTTON = 16,
      DLGC_UNDEFPUSHBUTTON = 32,
      DLGC_RADIOBUTTON = 64,
      DLGC_WANTCHARS = 128,
      DLGC_STATIC = 256,
      DLGC_BUTTON = 0x2000,
   }

   /* Frame Control Constants */
   enum : uint {
      DFC_CAPTION = 1,
      DFC_MENU = 2,
      DFC_SCROLL = 3,
      DFC_BUTTON = 4,
      DFC_POPUPMENU = 5,
   }

   enum : uint {
      DFCS_CAPTIONCLOSE = 0,
      DFCS_CAPTIONMIN = 1,
      DFCS_CAPTIONMAX = 2,
      DFCS_CAPTIONRESTORE = 3,
      DFCS_CAPTIONHELP = 4,
   }

   enum : uint {
      DFCS_SCROLLUP = 0,
      DFCS_SCROLLDOWN = 1,
      DFCS_SCROLLLEFT = 2,
      DFCS_SCROLLRIGHT = 3,
      DFCS_SCROLLCOMBOBOX = 5,
      DFCS_SCROLLSIZEGRIP = 8,
      DFCS_SCROLLSIZEGRIPRIGHT = 16,
   }

   enum : uint {
      DFCS_MENUARROW = 0,
      DFCS_MENUCHECK = 1,
      DFCS_MENUBULLET = 2,
      DFCS_MENUARROWRIGHT = 4,
   }

   enum : uint {
      DFCS_BUTTONCHECK = 0,
      DFCS_BUTTONRADIOIMAGE = 1,
      DFCS_BUTTONRADIOMASK = 2,
      DFCS_BUTTONRADIO = 4,
      DFCS_BUTTON3STATE = 8,
      DFCS_BUTTONPUSH = 16,
      DFCS_INACTIVE = 256,
      DFCS_PUSHED = 512,
      DFCS_CHECKED = 1024,
   }

   enum : uint {
      DFCS_TRANSPARENT = 0x800,
      DFCS_HOT = 0x1000,
      DFCS_ADJUSTRECT = 0x2000,
      DFCS_FLAT = 0x4000,
      DFCS_MONO = 0x8000,
   }

   /* Windows Generic Messages */
   enum : uint {
      WM_USER = 0x0400,
      WM_APP = 0x8000,
      WM_SETFONT = 0x0030,
      WM_GETFONT = 0x0031,
      WM_WINDOWPOSCHANGING = 0x0046,
      WM_WINDOWPOSCHANGED = 0x0047,
      WM_DRAWITEM = 0x002B,
      WM_CLEAR = 0x0303,
      WM_CUT = 0x0300,
      WM_COPY = 0x0301,
      WM_PASTE = 0x0302,
      WM_MOUSEWHEEL = 0x020A,
      WM_MOUSEHOVER = 0x02A1,
      WM_MOUSELEAVE = 0x02A3,
      WM_MENUCOMMAND = 0x0126,
      WM_PRINT = 0x0317,
      WM_PRINTCLIENT = 0x0318,
      WM_MEASUREITEM = 0x002C,//WM_COMPACTING 		= 0x0041,
      //WM_NEXTDLGCTL 	 	= 0x0028,
      //WM_CAPTURECHANGED     = 0x0215,
      //WM_DROPFILES 		 	= 0x0233,
      //WM_PALETTECHANGED  	= 0x0311,
      //WM_MDIACTIVATE 		= 0x0222,
      //WM_MDITILE 			= 0x0226,
      //WM_MDICASCADE 		= 0x0227,
      //WM_MDIICONARRANGE	 	= 0x0228,
      //WM_MDIGETACTIVE 	 	= 0x0229,
   }

   /* Windows Position and Size Flags */
   enum : uint {
      SWP_NOSIZE = 0x0001,
      SWP_NOMOVE = 0x0002,
      SWP_NOZORDER = 0x0004,
      SWP_NOREDRAW = 0x0008,
      SWP_NOACTIVATE = 0x0010,
      SWP_SHOWWINDOW = 0x0040,
      SWP_FRAMECHANGED = 0x0020,
      SWP_HIDEWINDOW = 0x0080,
      SWP_NOCOPYBITS = 0x0100,
      SWP_NOOWNERZORDER = 0x0200,
      SWP_NOSENDCHANGING = 0x0400,
      SWP_DRAWFRAME = SWP_FRAMECHANGED,
      SWP_NOREPOSITION = SWP_NOOWNERZORDER,
      SWP_DEFERERASE = 0x2000,
      SWP_ASYNCWINDOWPOS = 0x4000,
   }

   /* DIBs Flags */
   enum {
      DIB_RGB_COLORS = 0,
      DIB_PAL_COLORS = 1,
   }

   /* GDI Object Types */
   enum : uint {
      OBJ_PEN = 1,
      OBJ_BRUSH = 2,
      OBJ_DC = 3,
      OBJ_METADC = 4,
      OBJ_PAL = 5,
      OBJ_FONT = 6,
      OBJ_BITMAP = 7,
      OBJ_REGION = 8,
      OBJ_METAFILE = 9,
      OBJ_MEMDC = 10,
      OBJ_EXTPEN = 11,
      OBJ_ENHMETADC = 12,
      OBJ_ENHMETAFILE = 13,
   }

   /* Track Bar Messages */
   enum : uint {
      TBM_GETPOS = WM_USER,
      TBM_GETRANGEMIN = WM_USER + 1,
      TBM_GETRANGEMAX = WM_USER + 2,
      TBM_GETTIC = WM_USER + 3,
      TBM_SETTIC = WM_USER + 4,
      TBM_SETPOS = WM_USER + 5,
      TBM_SETRANGE = WM_USER + 6,
      TBM_SETRANGEMIN = WM_USER + 7,
      TBM_SETRANGEMAX = WM_USER + 8,
      TBM_CLEARTICS = WM_USER + 9,
      TBM_SETSEL = WM_USER + 10,
      TBM_SETSELSTART = WM_USER + 11,
      TBM_SETSELEND = WM_USER + 12,
      TBM_GETPTICS = WM_USER + 14,
      TBM_GETTICPOS = WM_USER + 15,
      TBM_GETNUMTICS = WM_USER + 16,
      TBM_GETSELSTART = WM_USER + 17,
      TBM_GETSELEND = WM_USER + 18,
      TBM_CLEARSEL = WM_USER + 19,
      TBM_SETTICFREQ = WM_USER + 20,
      TBM_SETPAGESIZE = WM_USER + 21,
      TBM_GETPAGESIZE = WM_USER + 22,
      TBM_SETLINESIZE = WM_USER + 23,
      TBM_GETLINESIZE = WM_USER + 24,
      TBM_GETTHUMBRECT = WM_USER + 25,
      TBM_GETCHANNELRECT = WM_USER + 26,
      TBM_SETTHUMBLENGTH = WM_USER + 27,
      TBM_GETTHUMBLENGTH = WM_USER + 28,
      TBM_SETTOOLTIPS = WM_USER + 29,
      TBM_GETTOOLTIPS = WM_USER + 30,
      TBM_SETTIPSIDE = WM_USER + 31,
      TBM_SETBUDDY = WM_USER + 32,
      TBM_GETBUDDY = WM_USER + 33,
      TBM_SETPOSNOTIFY = WM_USER + 34,
   }

   /* TrackBar Styles */
   enum : uint {
      TBS_AUTOTICKS = 0x0001,
      TBS_VERT = 0x0002,
      TBS_HORZ = 0x0000,
      TBS_TOP = 0x0004,
      TBS_BOTTOM = 0x0000,
      TBS_LEFT = 0x0004,
      TBS_RIGHT = 0x0000,
      TBS_BOTH = 0x0008,
      TBS_NOTICKS = 0x0010,
      TBS_ENABLESELRANGE = 0x0020,
      TBS_FIXEDLENGTH = 0x0040,
      TBS_NOTHUMB = 0x0080,
      TBS_TOOLTIPS = 0x0100,
   }

   /* DrawIconEx() API flags */
   enum : uint {
      DI_MASK = 0x0001,
      DI_IMAGE = 0x0002,
      DI_COMPAT = 0x0004,
      DI_DEFAULTSIZE = 0x0008,
      DI_NORMAL = DI_IMAGE | DI_MASK,
   }

   /* GetClassLong() API Flags */
   enum : int {
      GCL_MENUNAME = -8,
      GCL_HBRBACKGROUND = -10,
      GCL_HCURSOR = -12,
      GCL_HICON = -14,
      GCL_HMODULE = -16,
      GCL_CBWNDEXTRA = -18,
      GCL_CBCLSEXTRA = -20,
      GCL_WNDPROC = -24,
      GCL_STYLE = -26,
      GCL_HICONSM = -34,
   }

   /* Common Control Styles */
   enum : uint {
      CCS_TOP = 1,
      CCS_NOMOVEY = 2,
      CCS_BOTTOM = 3,
      CCS_NORESIZE = 4,
      CCS_NOPARENTALIGN = 8,
      CCS_ADJUSTABLE = 32,
      CCS_NODIVIDER = 64,
      CCS_VERT = 128,
      CCS_LEFT = 129,
      CCS_NOMOVEX = 130,
      CCS_RIGHT = 131,
   }

   /* GetWindowLong Flags() */
   enum : int {
      GWL_WNDPROC = -4,
      GWL_HINSTANCE = -6,
      GWL_HWNDPARENT = -8,
      GWL_STYLE = -16,
      GWL_EXSTYLE = -20,
      GWL_USERDATA = -21,
      GWL_ID = -12,
   }

   /* Notification Messages Base */
   enum : uint {
      NM_FIRST = 0,
      NM_CLICK = NM_FIRST - 2,
      NM_RCLICK = NM_FIRST - 5,
      NM_CUSTOMDRAW = NM_FIRST - 12,
   }

   /* DrawEdge() API Flags */
   enum : uint {
      BDR_RAISEDOUTER = 1,
      BDR_SUNKENOUTER = 2,
      BDR_RAISEDINNER = 4,
      BDR_SUNKENINNER = 8,
      BDR_OUTER = 3,
      BDR_INNER = 0xc,
      BDR_RAISED = 5,
      BDR_SUNKEN = 10,
      EDGE_RAISED = BDR_RAISEDOUTER | BDR_RAISEDINNER,
      EDGE_SUNKEN = BDR_SUNKENOUTER | BDR_SUNKENINNER,
      EDGE_ETCHED = BDR_SUNKENOUTER | BDR_RAISEDINNER,
      EDGE_BUMP = BDR_RAISEDOUTER | BDR_SUNKENINNER,

      BF_LEFT = 1,
      BF_TOP = 2,
      BF_RIGHT = 4,
      BF_BOTTOM = 8,
      BF_TOPLEFT = BF_TOP | BF_LEFT,
      BF_TOPRIGHT = BF_TOP | BF_RIGHT,
      BF_BOTTOMLEFT = BF_BOTTOM | BF_LEFT,
      BF_BOTTOMRIGHT = BF_BOTTOM | BF_RIGHT,
      BF_RECT = BF_LEFT | BF_TOP | BF_RIGHT | BF_BOTTOM,

      BF_DIAGONAL = 16,
      BF_DIAGONAL_ENDTOPRIGHT = BF_DIAGONAL | BF_TOP | BF_RIGHT,
      BF_DIAGONAL_ENDTOPLEFT = BF_DIAGONAL | BF_TOP | BF_LEFT,
      BF_DIAGONAL_ENDBOTTOMLEFT = BF_DIAGONAL | BF_BOTTOM | BF_LEFT,
      BF_DIAGONAL_ENDBOTTOMRIGHT = BF_DIAGONAL | BF_BOTTOM | BF_RIGHT,
      BF_MIDDLE = 0x800,
      BF_SOFT = 0x1000,
      BF_ADJUST = 0x2000,
      BF_FLAT = 0x4000,
      BF_MONO = 0x8000,
   }

   /* Rich Edit Messages */
   enum : uint {
      ES_DISABLENOSCROLL = 0x00002000,

      ENM_NONE = 0x00000000,
      ENM_CHANGE = 0x00000001,
      ENM_UPDATE = 0x00000002,
      ENM_LINK = 0x04000000,
      ENM_PROTECTED = 0x00200000,

      EM_CANPASTE = WM_USER + 50,
      EM_EXGETSEL = WM_USER + 52,
      EM_EXLIMITTEXT = WM_USER + 53,
      EM_EXLINEFROMCHAR = WM_USER + 54,
      EM_EXSETSEL = WM_USER + 55,
      EM_GETCHARFORMAT = WM_USER + 58,
      EM_GETSELTEXT = WM_USER + 62,
      EM_PASTESPECIAL = WM_USER + 64,
      EM_SETBKGNDCOLOR = WM_USER + 67,
      EM_SETCHARFORMAT = WM_USER + 68,
      EM_SETEVENTMASK = WM_USER + 69,
      EM_STREAMIN = WM_USER + 73,
      EM_STREAMOUT = WM_USER + 74,
      EM_GETTEXTRANGE = WM_USER + 75,

      /* Rich Edit 2.0 */
      EM_SETUNDOLIMIT = WM_USER + 82,
      EM_REDO = WM_USER + 84,
      EM_CANREDO = WM_USER + 85,
      EM_GETUNDONAME = WM_USER + 86,
      EM_GETREDONAME = WM_USER + 87,
      EM_STOPGROUPTYPING = WM_USER + 88,
      EM_SETTEXTMODE = WM_USER + 89,
      EM_GETTEXTMODE = WM_USER + 90,
      EM_AUTOURLDETECT = WM_USER + 91,
      EM_GETAUTOURLDETECT = WM_USER + 92,
      EM_SETPALETTE = WM_USER + 93,
      EM_GETTEXTEX = WM_USER + 94,
      EM_GETTEXTLENGTHEX = WM_USER + 95,
      EM_SHOWSCROLLBAR = WM_USER + 96,
      EM_SETTEXTEX = WM_USER + 97,
      EN_LINK = 0x070B,
   }

   const HBMMENU_CALLBACK = cast(HBITMAP)-1;

   /+
	/* Rich Edit Text Styles */
	enum: uint
	{
		SF_TEXT 			= 0x0001,
		SF_RTF				= 0x0002,
		SF_RTFNOOBJS 		= 0x0003,
		SF_TEXTIZED 		= 0x0004,

		SFF_SELECTION 		= 0x8000,
		SFF_PLAINRTF 		= 0x4000,

		SCF_SELECTION 		= 0x0001,
		SCF_WORD 			= 0x0002,
		SCF_ALL 			= 0x0004,

		CFM_BOLD 			= 0x00000001,
		CFM_ITALIC 			= 0x00000002,
		CFM_UNDERLINE 		= 0x00000004,
		CFM_STRIKEOUT 		= 0x00000008,
		CFM_PROTECTED 		= 0x00000010,
		CFM_LINK 			= 0x00000020,
		CFM_SIZE 			= 0x80000000,
		CFM_COLOR 			= 0x40000000,
		CFM_FACE			= 0x20000000,
		CFM_OFFSET 			= 0x10000000,
		CFM_CHARSET 		= 0x08000000,
		CFM_SMALLCAPS 		= 0x0040,
		CFM_ALLCAPS 		= 0x0080,
		CFM_HIDDEN 			= 0x0100,
		CFM_OUTLINE			= 0x0200,
		CFM_SHADOW			= 0x0400,
		CFM_EMBOSS 			= 0x0800,
		CFM_IMPRINT 		= 0x1000,
		CFM_DISABLED 		= 0x2000,
		CFM_REVISED 		= 0x4000,
		CFM_BACKCOLOR		= 0x04000000,
		CFM_LCID 			= 0x02000000,
		CFM_UNDERLINETYPE	= 0x00800000,
		CFM_WEIGHT 			= 0x00400000,
		CFM_SPACING 		= 0x00200000,
		CFM_KERNING 		= 0x00100000,
		CFM_STYLE 			= 0x00080000,
		CFM_ANIMATION 		= 0x00040000,
		CFM_REVAUTHOR 		= 0x00008000,

		CFE_BOLD 			= 0x0001,
		CFE_ITALIC 			= 0x0002,
		CFE_UNDERLINE 		= 0x0004,
		CFE_STRIKEOUT 		= 0x0008,
		CFE_PROTECTED 		= 0x0010,
		CFE_LINK 			= 0x0020,
		CFE_AUTOCOLOR 		= 0x40000000,
		CFE_AUTOBACKCOLOR	= CFM_BACKCOLOR,
		CFE_SUBSCRIPT 		= 0x00010000,
		CFE_SUPERSCRIPT		= 0x00020000,

		CFM_SUBSCRIPT 		= CFE_SUBSCRIPT | CFE_SUPERSCRIPT,
		CFM_SUPERSCRIPT 	= CFM_SUBSCRIPT,

		CFU_UNDERLINE 		= 1,
	}
	+/

   enum : DWORD {
      OFN_OVERWRITEPROMPT = 0x00000002,
      OFN_PATHMUSTEXIST = 0x00000800,
      OFN_FILEMUSTEXIST = 0x00001000,
      OFN_CREATEPROMPT = 0x00002000,//OFN_READONLY 				= 0x00000001,
      //OFN_HIDEREADONLY 			= 0x00000004,
      //OFN_NOCHANGEDIR 			= 0x00000008,
      //OFN_SHOWHELP 				= 0x00000010,
      //OFN_ENABLEHOOK 			= 0x00000020,
      //OFN_ENABLETEMPLATE		= 0x00000040,
      //OFN_ENABLETEMPLATEHANDLE 	= 0x00000080,
      //OFN_NOVALIDATE 			= 0x00000100,
      //OFN_ALLOWMULTISELECT 		= 0x00000200,
      //OFN_EXTENSIONDIFFERENT 	= 0x00000400,
      //OFN_SHAREAWARE 			= 0x00004000,
      //OFN_NOREADONLYRETURN 		= 0x00008000,
      //OFN_NOTESTFILECREATE 		= 0x00010000,
      //OFN_NONETWORKBUTTON 		= 0x00020000,
      //OFN_NOLONGNAMES 			= 0x00040000,
      //OFN_EXPLORER 				= 0x00080000,
      //OFN_NODEREFERENCELINKS 	= 0x00100000,
      //OFN_LONGNAMES 			= 0x00200000,
      //OFN_ENABLEINCLUDENOTIFY 	= 0x00400000,
      //OFN_ENABLESIZING 			= 0x00800000,
      //OFN_DONTADDTORECENT 		= 0x02000000,
      //OFN_FORCESHOWHIDDEN 		= 0x10000000,
   }

   enum : DWORD {
      CF_SCREENFONTS = 0x00000001,
      CF_INITTOLOGFONTSTRUCT = 0x00000040,
      CF_EFFECTS = 0x00000100,//CF_PRINTERFONTS			 = 0x00000002,
      //CF_BOTH					 = CF_SCREENFONTS | CF_PRINTERFONTS,
      //CF_SHOWHELP				 = 0x00000004,
      //CF_ENABLEHOOK				 = 0x00000008,
      //CF_ENABLETEMPLATE			 = 0x00000010,
      //CF_ENABLETEMPLATEHANDLE	 = 0x00000020,
      //CF_USESTYLE				 = 0x00000080,
      //CF_APPLY					 = 0x00000200,
      //CF_ANSIONLY				 = 0x00000400,
      //CF_SCRIPTSONLY			 = CF_ANSIONLY,
      //CF_NOVECTORFONTS			 = 0x00000800,
      //CF_NOOEMFONTS				 = CF_NOVECTORFONTS,
      //CF_NOSIMULATIONS			 = 0x00001000,
      //CF_LIMITSIZE				 = 0x00002000,
      //CF_FIXEDPITCHONLY			 = 0x00004000,
      //CF_WYSIWYG				 = 0x00008000,
      //CF_FORCEFONTEXIST		  	 = 0x00010000,
      //CF_SCALABLEONLY			 = 0x00020000,
      //CF_TTONLY					 = 0x00040000,
      //CF_NOFACESEL				 = 0x00080000,
      //CF_NOSTYLESEL				 = 0x00100000,
      //CF_NOSIZESEL				 = 0x00200000,
      //CF_SELECTSCRIPT			 = 0x00400000,
      //CF_NOSCRIPTSEL 			 = 0x00800000,
      //CF_NOVERTFONTS 			 = 0x01000000,
   }

   enum : uint {
      ODT_MENU = 1,
      ODT_LISTBOX = 2,
      ODT_COMBOBOX = 3,
      ODT_BUTTON = 4,
      ODT_STATIC = 5,
   }

   /*
	enum: uint
	{
		MDITILE_VERTICAL = 0x0000,
		MDITILE_HORIZONTAL = 0x0001,
		MDITILE_SKIPDISABLED = 0x0002,
		MDITILE_ZORDER = 0x0004,
	}
	*/

   enum {
      DS_ABSALIGN = 0x0001,
      DS_3DLOOK = 0x0004,
      DS_SYSMODAL = 0x0002,
      DS_FIXEDSYS = 0x0008,
      DS_NOFAILCREATE = 0x0010,
      DS_LOCALEDIT = 0x0020,
      DS_SETFONT = 0x0040,
      DS_MODALFRAME = 0x0080,
      DS_NOIDLEMSG = 0x0100,
      DS_SETFOREGROUND = 0x0200,
      DS_CONTROL = 0x0400,
      DS_CENTER = 0x0800,
      DS_CENTERMOUSE = 0x1000,
      DS_CONTEXTHELP = 0x2000,
      DS_SHELLFONT = DS_SETFONT | DS_FIXEDSYS,
   }

   enum {
      WS_EX_ACCEPTFILES = 16,
      WS_EX_APPWINDOW = 0x40000,
      WS_EX_CLIENTEDGE = 512,
      WS_EX_COMPOSITED = 0x2000000, // Windows XP
      WS_EX_CONTEXTHELP = 0x400,
      WS_EX_CONTROLPARENT = 0x10000,
      WS_EX_DLGMODALFRAME = 1,
      WS_EX_LAYERED = 0x80000, // Windows 2000
      WS_EX_LAYOUTRTL = 0x400000, // Windows 98, Windows 2000
      WS_EX_LEFT = 0,
      WS_EX_LEFTSCROLLBAR = 0x4000,
      WS_EX_LTRREADING = 0,
      WS_EX_MDICHILD = 64,
      WS_EX_NOACTIVATE = 0x8000000, // Windows 2000
      WS_EX_NOINHERITLAYOUT = 0x100000, // Windows 2000
      WS_EX_NOPARENTNOTIFY = 4,
      WS_EX_OVERLAPPEDWINDOW = 0x300,
      WS_EX_PALETTEWINDOW = 0x188,
      WS_EX_RIGHT = 0x1000,
      WS_EX_RIGHTSCROLLBAR = 0,
      WS_EX_RTLREADING = 0x2000,
      WS_EX_STATICEDGE = 0x20000,
      WS_EX_TOOLWINDOW = 128,
      WS_EX_TOPMOST = 8,
      WS_EX_WINDOWEDGE = 256,//WS_EX_TRANSPARENT		 = 32,
   }

   /* ToolTip Messages */
   enum : uint {
      TTM_ACTIVATE = WM_USER + 1,
      TTM_SETDELAYTIME = WM_USER + 3,
      TTM_POP = WM_USER + 28,
      TTM_SETTITLEW = WM_USER + 33,
      TTM_POPUP = WM_USER + 34,
      TTM_ADDTOOLW = WM_USER + 50,
      TTM_DELTOOLW = WM_USER + 51,
      TTM_GETTEXTW = WM_USER + 56,
      TTM_UPDATETIPTEXTW = WM_USER + 57,

      TTN_FIRST = -520u,
      TTN_GETDISPINFOW = TTN_FIRST - 10,//TTN_SHOW         = TTN_FIRST - 1,
      //TTN_POP          = TTN_FIRST - 2,
      //TTM_ADDTOOLA              = WM_USER + 4,
      //TTM_DELTOOLA               = WM_USER + 5,
      //TTM_GETTOOLINFOA      = WM_USER + 8,
      //TTM_GETTEXTA 		 = WM_USER + 11,
      //TTM_UPDATETIPTEXTA    = WM_USER + 12,
      //TTM_ENUMTOOLSA 	 = WM_USER + 14,
      //TTM_GETCURRENTTOOLA = WM_USER + 15,
   }

   /* ToolTip Icons */
   enum : uint {
      TTI_NONE = 0,
      TTI_INFO = 1,
      TTI_WARNING = 2,
      TTI_ERROR = 3,
   }

   /* ToolTip Styles */
   enum : uint {
      TTS_ALWAYSTIP = 0x01,
      TTS_NOPREFIX = 0x02,
      TTS_NOANIMATE = 0x10, // IE5+
      TTS_NOFADE = 0x20, // IE5+
      TTS_BALLOON = 0x40, // IE5+
      TTS_CLOSE = 0x80,
   }

   /* ToolTip Flags */
   enum : uint {
      TTF_IDISHWND = 0x0001,
      TTF_CENTERTIP = 0x0002,
      TTF_RTLREADING = 0x0004,
      TTF_SUBCLASS = 0x0010,
      TTF_TRACK = 0x0020, // IE3+
      TTF_ABSOLUTE = 0x0080, // IE3+
      TTF_TRANSPARENT = 0x0100, // IE3+
      TTF_PARSELINKS = 0x1000,
      TTF_DI_SETITEM = 0x8000, // IE3+
   }

   enum : uint {
      AW_HOR_POSITIVE = 0x00000001,
      AW_HOR_NEGATIVE = 0x00000002,
      AW_VER_POSITIVE = 0x00000004,
      AW_VER_NEGATIVE = 0x00000008,
      AW_CENTER = 0x00000010,
      AW_HIDE = 0x00010000,
      AW_ACTIVATE = 0x00020000,
      AW_SLIDE = 0x00040000,
      AW_BLEND = 0x00080000,
   }

   enum : uint {
      MF_STRING = 0x00000000,
      MF_UNCHECKED = 0x00000000,
      MF_BYCOMMAND = 0x00000000,
      MF_GRAYED = 0x00000001,
      MF_CHECKED = 0x00000008,
      MF_POPUP = 0x00000010,
      MF_MENUBARBREAK = 0x00000020,
      MF_MENUBREAK = 0x00000040,
      MF_BYPOSITION = 0x00000400,
      MF_SEPARATOR = 0x00000800,
      MF_DEFAULT = 0x00001000,
      MF_SYSMENU = 0x00002000,

      MFT_STRING = MF_STRING,
      MFT_MENUBARBREAK = MF_MENUBARBREAK,
      MFT_MENUBREAK = MF_MENUBREAK,
      MFT_RADIOCHECK = 0x00000200,
      MFT_SEPARATOR = MF_SEPARATOR,

      MFS_UNCHECKED = MF_UNCHECKED,
      MFS_CHECKED = MF_CHECKED,
      MFS_DEFAULT = MF_DEFAULT,
      MFS_GRAYED = MF_GRAYED,
      MFS_DISABLED = 3,
      MFS_ENABLED = 0,

      MIIM_DATA = 32,
      MIIM_STATE = 0x00000001,
      MIIM_ID = 0x00000002,
      MIIM_SUBMENU = 0x00000004,
      MIIM_CHECKMARKS = 0x00000008,
      MIIM_TYPE = 0x00000010,
      MIIM_BITMAP = 0x00000080,
   }

   /*
	enum: int
	{
		RGN_AND  = 1,
		RGN_OR   = 2,
		RGN_XOR  = 3,
		RGN_DIFF = 4,
		RGN_COPY = 5,
	}
	*/

   enum : int {
      HWND_TOP = 0,
      HWND_BOTTOM = 1,
      HWND_TOPMOST = -1,
      HWND_NOTOPMOST = -2,
   }

   enum : uint {
      CBS_SIMPLE = 0x0001,
      CBS_DROPDOWN = 0x0002,
      CBS_DROPDOWNLIST = 0x0003,
      CBS_AUTOHSCROLL = 0x0040,
      CBS_OWNERDRAWFIXED = 0x0010,
      CBS_OWNERDRAWVARIABLE = 0x0020,
   }

   enum : uint {
      CBEIF_TEXT = 0x00000001,
      CBEIF_IMAGE = 0x00000002,
      CBEIF_SELECTEDIMAGE = 0x00000004,
      CBEIF_OVERLAY = 0x00000008,
      CBEIF_INDENT = 0x00000010,
      CBEIF_LPARAM = 0x00000020,
      CBEIF_DI_SETITEM = 0x10000000,
   }

   enum : uint {
      TME_HOVER = 1,
      TME_LEAVE = 2,
      TME_QUERY = 0x40000000,
      TME_CANCEL = 0x80000000,

      HOVER_DEFAULT = 0xFFFFFFFF,
   }

   enum : uint {
      TPM_LEFTBUTTON = 0x0000,
      TPM_RIGHTBUTTON = 0x0002,
      TPM_LEFTALIGN = 0x0000,
      TPM_CENTERALIGN = 0x0004,
      TPM_RIGHTALIGN = 0x0008,
      TPM_TOPALIGN = 0x0000,
      TPM_VCENTERALIGN = 0x0010,
      TPM_BOTTOMALIGN = 0x0020,
      TPM_HORIZONTAL = 0x0000,
      TPM_VERTICAL = 0x0040,
      TPM_NONOTIFY = 0x0080,
      TPM_RETURNCMD = 0x0100,
      TPM_RECURSE = 0x0001,
   }

   enum {
      ICON_SMALL = 0,
      ICON_BIG = 1,
   }

   enum : uint {
      SPI_GETNONCLIENTMETRICS = 41,
      SPI_GETWORKAREA = 48,
      SPI_GETANIMATION = 72,
      SPI_GETWHEELSCROLLLINES = 104,
      SPI_GETWHEELSCROLLCHARS = 108,
   }

   enum : uint {
      ODS_SELECTED = 1,
      ODS_GRAYED = 2,
      ODS_DISABLED = 4,
      ODS_CHECKED = 8,
      ODS_FOCUS = 16,
      ODS_DEFAULT = 32,
      ODS_COMBOBOXEDIT = 4096,
   }

   const LPWSTR IDC_ARROW = cast(LPWSTR)32512;
   const LPWSTR IDC_UPARROW = cast(LPWSTR)32516;
   const LPWSTR IDC_ICON = cast(LPWSTR)32641;
   const LPWSTR IDC_APPSTARTING = cast(LPWSTR)32650;
   const LPWSTR IDC_HAND = cast(LPWSTR)32649; // Windows 98+
   const LPWSTR IDC_HELP = cast(LPWSTR)32651;
   const LPWSTR IDC_IBEAM = cast(LPWSTR)32513;
   const LPWSTR IDC_NO = cast(LPWSTR)32648;
   const LPWSTR IDC_SIZEALL = cast(LPWSTR)32646;
   const LPWSTR IDC_SIZENESW = cast(LPWSTR)32643;
   const LPWSTR IDC_SIZENS = cast(LPWSTR)32645;
   const LPWSTR IDC_SIZENWSE = cast(LPWSTR)32642;
   const LPWSTR IDC_SIZEWE = cast(LPWSTR)32644;
   const LPWSTR IDC_WAIT = cast(LPWSTR)32514;

   enum : ushort {
      MK_LBUTTON = 0x0001,
      MK_RBUTTON = 0x0002,
      MK_SHIFT = 0x0004,
      MK_CONTROL = 0x0008,
      MK_MBUTTON = 0x0010,
   }

   enum {
      LOGPIXELSX = 88,
      LOGPIXELSY = 90,
   }

   enum {
      LB_OKAY = 0,
      LB_ERR = -1,
      LB_ERRSPACE = -2,
   }

   enum : uint {
      LB_GETCOUNT = 0x018B,
      LB_GETITEMDATA = 0x0199,
      LB_ADDSTRING = 0x0180,
      LB_SETITEMDATA = 0x019A,
      LB_RESETCONTENT = 0x0184,
      LB_INSERTSTRING = 0x0181,
      LB_DELETESTRING = 0x0182,
      LB_GETHORIZONTALEXTENT = 0x0193,
      LB_SETHORIZONTALEXTENT = 0x0194,
      LB_SETITEMHEIGHT = 0x01A0,
      LB_GETITEMHEIGHT = 0x01A1,
      LB_GETSELCOUNT = 0x0190,
      LB_GETSELITEMS = 0x0191,
      LB_SETCURSEL = 0x0186,
      LB_GETCURSEL = 0x0188,
      LB_SETTOPINDEX = 0x0197,
      LB_GETTOPINDEX = 0x018E,
      LB_SELITEMRANGE = 0x0183,
      LB_SETSEL = 0x0185,
      LB_FINDSTRING = 0x018F,
      LB_FINDSTRINGEXACT = 0x01A2,
      LB_GETITEMRECT = 0x0198,
      LB_GETSEL = 0x0187,
      LB_ITEMFROMPOINT = 0x01A9,
      LB_ADDFILE = 0x0196,
      LB_DIR = 0x018D,
   }

   enum : uint {
      LBS_NOINTEGRALHEIGHT = 0x0100,
      LBS_MULTICOLUMN = 0x0200,
      LBS_DISABLENOSCROLL = 0x1000,
      LBS_NOSEL = 0x4000,
      LBS_EXTENDEDSEL = 0x0800,
      LBS_MULTIPLESEL = 0x0008,
      LBS_SORT = 0x0002,
      LBS_USETABSTOPS = 0x0080,
      LBS_OWNERDRAWVARIABLE = 0x0020,
      LBS_OWNERDRAWFIXED = 0x0010,
      LBS_NOTIFY = 0x0001,
      LBS_HASSTRINGS = 0x0040,
      LBS_WANTKEYBOARDINPUT = 0x0400,
   }

   enum {
      LBN_ERRSPACE = -2,
      LBN_SELCHANGE = 1,
      LBN_DBLCLK = 2,
      LBN_SELCANCEL = 3,
      LBN_SETFOCUS = 4,
      LBN_KILLFOCUS = 5,
   }

   enum {
      CB_OKAY = 0,
      CB_ERR = -1,
      CB_ERRSPACE = -2,
   }

   enum : uint {
      CB_SETCURSEL = 0x014E,
      CB_GETCURSEL = 0x0147,
      CB_FINDSTRING = 0x014C,
      CB_FINDSTRINGEXACT = 0x0158,
      CB_SETITEMHEIGHT = 0x0153,
      CB_GETITEMHEIGHT = 0x0154,
      CB_ADDSTRING = 0x0143,
      CB_DELETESTRING = 0x0144,
      CB_DIR = 0x0145,
      CB_INSERTSTRING = 0x014A,
      CB_RESETCONTENT = 0x014B,
      CB_SETITEMDATA = 0x0151,
      CB_GETDROPPEDWIDTH = 0x015f,
      CB_SETDROPPEDWIDTH = 0x0160,
      CB_LIMITTEXT = 0x0141,
      CB_GETEDITSEL = 0x0140,
      CB_SETEDITSEL = 0x0142,
      CB_SHOWDROPDOWN = 0x014F,
      CB_GETDROPPEDSTATE = 0x0157,

      //CBEM_INSERTITEMA 		= WM_USER + 1,
      //CBEM_GETITEMA			= WM_USER + 4,
      //CBEM_SETITEMA			= WM_USER + 5,
      CBEM_SETIMAGELIST = WM_USER + 2,
      CBEM_GETIMAGELIST = WM_USER + 3,
      CBEM_DELETEITEM = CB_DELETESTRING,
      CBEM_GETCOMBOCONTROL = WM_USER + 6,
      CBEM_GETEDITCONTROL = WM_USER + 7,
      CBEM_SETEXSTYLE = WM_USER + 8,
      CBEM_GETEXSTYLE = WM_USER + 9,
      CBEM_SETEXTENDEDSTYLE = WM_USER + 14,
      CBEM_GETEXTENDEDSTYLE = WM_USER + 9,
      CBEM_HASEDITCHANGED = WM_USER + 10,
      CBEM_INSERTITEMW = WM_USER + 11,
      CBEM_SETITEMW = WM_USER + 12,
      CBEM_GETITEMW = WM_USER + 13,
   }

   enum : DWORD {
      CBS_SORT = 0x0100,
      CBS_HASSTRINGS = 0x0200,
      CBS_NOINTEGRALHEIGHT = 0x0400,
   }

   enum {
      CBN_SELCHANGE = 1,
      CBN_SETFOCUS = 3,
      CBN_KILLFOCUS = 4,
      CBN_EDITCHANGE = 5,
   }

   enum : uint {
      TVE_COLLAPSE = 0x0001,
      TVE_EXPAND = 0x0002,
      TVE_TOGGLE = 0x0003,
   }

   enum : uint {
      TVIS_SELECTED = 0x0002,
      TVIS_EXPANDED = 0x0020,
   }

   enum : uint {
      TVIF_TEXT = 0x0001,
      TVIF_IMAGE = 0x0002,
      TVIF_PARAM = 0x0004,
      TVIF_STATE = 0x0008,
      TVIF_HANDLE = 0x0010,
      TVIF_SELECTEDIMAGE = 0x0020,
      TVIF_CHILDREN = 0x0040,
      TVIF_INTEGRAL = 0x0080, // IE4+
   }

   enum : uint {
      TVGN_FIRSTVISIBLE = 0x0005,
      TVGN_CARET = 0x0009,
   }

   enum : uint {
      TV_FIRST = 0x1100,
      TVN_FIRST = cast(UINT)-400,

      TVM_INSERTITEMA = TV_FIRST + 0,
      TVM_DELETEITEM = TV_FIRST + 1,
      TVM_EXPAND = TV_FIRST + 2,
      TVM_GETITEMRECT = TV_FIRST + 4,
      TVM_GETINDENT = TV_FIRST + 6,
      TVM_SETINDENT = TV_FIRST + 7,
      TVM_SETIMAGELIST = TV_FIRST + 9,
      TVM_GETNEXTITEM = TV_FIRST + 10,
      TVM_SELECTITEM = TV_FIRST + 11,
      TVM_GETITEMA = TV_FIRST + 12,
      TVM_SETITEMA = TV_FIRST + 13,
      TVM_EDITLABELA = TV_FIRST + 14,
      TVM_GETVISIBLECOUNT = TV_FIRST + 16,
      TVM_HITTEST = TV_FIRST + 17,
      TVM_ENSUREVISIBLE = TV_FIRST + 20,
      TVM_SETITEMHEIGHT = TV_FIRST + 27, // Internet Explorer 4+
      TVM_GETITEMHEIGHT = TV_FIRST + 28, // Internet Explorer 4+
      TVM_INSERTITEMW = TV_FIRST + 50,
      TVM_SETITEMW = TV_FIRST + 63,
      TVM_GETITEMW = TV_FIRST + 62,

      TVN_SELCHANGINGA = TVN_FIRST - 1,
      TVN_SELCHANGEDA = TVN_FIRST - 2,
      TVN_GETDISPINFOA = TVN_FIRST - 3,
      TVN_ITEMEXPANDINGA = TVN_FIRST - 5,
      TVN_ITEMEXPANDEDA = TVN_FIRST - 6,
      TVN_BEGINLABELEDITA = TVN_FIRST - 10,
      TVN_ENDLABELEDITA = TVN_FIRST - 11,
      TVN_SELCHANGINGW = TVN_FIRST - 50,
      TVN_SELCHANGEDW = TVN_FIRST - 51,
      TVN_GETDISPINFOW = TVN_FIRST - 52,
      TVN_ITEMEXPANDINGW = TVN_FIRST - 54,
      TVN_ITEMEXPANDEDW = TVN_FIRST - 55,
      TVN_BEGINLABELEDITW = TVN_FIRST - 59,
      TVN_ENDLABELEDITW = TVN_FIRST - 60,
   }

   enum : uint {
      TVS_HASBUTTONS = 0x0001,
      TVS_HASLINES = 0x0002,
      TVS_LINESATROOT = 0x0004,
      TVS_EDITLABELS = 0x0008,
      TVS_SHOWSELALWAYS = 0x0020,
      TVS_CHECKBOXES = 0x0100, // Internet Explorer 3+
      TVS_TRACKSELECT = 0x0200, // Internet Explorer 3+
      TVS_FULLROWSELECT = 0x1000, // Internet Explorer 4+
      TVS_NOSCROLL = 0x2000, // Internet Explorer 4+
      TVS_SINGLEEXPAND = 0x0400, // Internet Explorer 4+
   }

   enum : HTREEITEM {
      TVI_ROOT = cast(HTREEITEM)-0x10000,
      TVI_FIRST = cast(HTREEITEM)-0x0FFFF,
      TVI_LAST = cast(HTREEITEM)-0x0FFFE,
      TVI_SORT = cast(HTREEITEM)-0x0FFFD,
   }

   enum : uint {
      TVC_UNKNOWN = 0x0000,
      TVC_BYMOUSE = 0x0001,
      TVC_BYKEYBOARD = 0x0002,
   }

   enum : WPARAM {
      TVSIL_NORMAL = 0,
      TVSIL_STATE = 2,
   }

   enum : uint {
      SB_SETTEXTA = WM_USER + 1,
      SB_SETPARTS = WM_USER + 4,
      SB_SIMPLE = WM_USER + 9,
      SB_SETTEXTW = WM_USER + 11,

      SBARS_SIZEGRIP = 0x0100,
   }

   enum : WPARAM {
      SBT_NOBORDERS = 0x0100,
      SBT_POPOUT = 0x0200,
      SBT_RTLREADING = 0x0400,
      SBT_OWNERDRAW = 0x1000,
   }

   enum : uint {
      LVM_FIRST = 0x1000,

      LVM_SETBKCOLOR = LVM_FIRST + 1,
      LVM_SETIMAGELIST = LVM_FIRST + 3,
      LVM_SETITEMW = LVM_FIRST + 76,
      LVM_DELETEITEM = LVM_FIRST + 8,
      LVM_DELETEALLITEMS = LVM_FIRST + 9,
      LVM_SETCALLBACKMASK = LVM_FIRST + 11,
      LVM_GETNEXTITEM = LVM_FIRST + 12,
      LVM_GETITEMRECT = LVM_FIRST + 14,
      LVM_ENSUREVISIBLE = LVM_FIRST + 19,
      LVM_REDRAWITEMS = LVM_FIRST + 21,
      LVM_ARRANGE = LVM_FIRST + 22,
      LVM_DELETECOLUMN = LVM_FIRST + 28,
      LVM_SETCOLUMNWIDTH = LVM_FIRST + 30,
      LVM_SETTEXTCOLOR = LVM_FIRST + 36,
      LVM_SETTEXTBKCOLOR = LVM_FIRST + 38,
      LVM_SETITEMSTATE = LVM_FIRST + 43,
      LVM_GETITEMSTATE = LVM_FIRST + 44,
      LVM_SETITEMTEXTA = LVM_FIRST + 46,
      LVM_SORTITEMS = LVM_FIRST + 48,
      LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54,
      LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55,
      LVM_INSERTITEMW = LVM_FIRST + 77,
      LVM_SETCOLUMNW = LVM_FIRST + 96,
      LVM_INSERTCOLUMNW = LVM_FIRST + 97,
      LVM_SETITEMTEXTW = LVM_FIRST + 116,
      LVM_EDITLABELW = LVM_FIRST + 118,//LVM_SETITEMA	  				= LVM_FIRST + 6,
      //LVM_INSERTITEMA 				= LVM_FIRST + 7,
      //LVM_EDITLABELA 				= LVM_FIRST + 23,
      //LVM_GETCOLUMNA 				= LVM_FIRST + 25,
      //LVM_SETCOLUMNA 				= LVM_FIRST + 26,
      //LVM_INSERTCOLUMNA				= LVM_FIRST + 27,
   }

   enum : uint {
      LVIS_OVERLAYMASK = 0x0F00,
      LVIS_STATEIMAGEMASK = 0xF000,
   }

   enum : uint {
      LVN_FIRST = cast(uint)-100,

      LVN_ITEMCHANGING = LVN_FIRST - 0,
      LVN_ITEMCHANGED = LVN_FIRST - 1,
      LVN_BEGINLABELEDITW = LVN_FIRST - 75,
      LVN_ENDLABELEDITW = LVN_FIRST - 76,
      LVN_COLUMNCLICK = LVN_FIRST - 8,
      LVN_GETDISPINFOW = LVN_FIRST - 77,//LVN_BEGINLABELEDITA 	= LVN_FIRST - 5,
      //LVN_GETDISPINFOA 		= LVN_FIRST - 50,
      //LVN_ENDLABELEDITA 	= LVN_FIRST - 6,
   }

   enum : uint {
      LVCF_FMT = 0x0001,
      LVCF_WIDTH = 0x0002,
      LVCF_TEXT = 0x0004,
      LVCF_SUBITEM = 0x0008,
   }

   enum : int {
      LVCFMT_LEFT = 0x0000,
      LVCFMT_RIGHT = 0x0001,
      LVCFMT_CENTER = 0x0002,
      LVCFMT_JUSTIFYMASK = 0x0003,
   }

   enum : uint {
      LVIF_TEXT = 0x0001,
      LVIF_IMAGE = 0x0002,
      LVIF_PARAM = 0x0004,
      LVIF_STATE = 0x0008,
   }

   enum : uint {
      LVIS_FOCUSED = 0x0001,
      LVIS_SELECTED = 0x0002,
      LVIS_CUT = 0x0004,
      LVIS_DROPHILITED = 0x0008,
   }

   enum : uint {
      LVS_ALIGNTOP = 0x0000,
      LVS_ALIGNLEFT = 0x0800,
      LVS_ICON = 0x0000,
      LVS_REPORT = 0x0001,
      LVS_SMALLICON = 0x0002,
      LVS_LIST = 0x0003,
      LVS_SINGLESEL = 0x0004,
      LVS_SHOWSELALWAYS = 0x0008,
      LVS_SORTASCENDING = 0x0010,
      LVS_SORTDESCENDING = 0x0020,
      LVS_SHAREIMAGELISTS = 0x0040,
      LVS_NOLABELWRAP = 0x0080,
      LVS_AUTOARRANGE = 0x0100,
      LVS_EDITLABELS = 0x0200,
      LVS_OWNERDRAWFIXED = 0x0400,
      LVS_OWNERDATA = 0x1000,
      LVS_NOSCROLL = 0x2000,
   }

   enum : uint {
      LVS_EX_GRIDLINES = 0x00000001,
      LVS_EX_SUBITEMIMAGES = 0x00000002,
      LVS_EX_CHECKBOXES = 0x00000004,
      LVS_EX_TRACKSELECT = 0x00000008,
      LVS_EX_HEADERDRAGDROP = 0x00000010,
      LVS_EX_FULLROWSELECT = 0x00000020,
      LVS_EX_ONECLICKACTIVATE = 0x00000040,
      LVS_EX_TWOCLICKACTIVATE = 0x00000080,

      // Internet Explorer 4+
      LVS_EX_FLATSB = 0x00000100,
      LVS_EX_REGIONAL = 0x00000200,
      LVS_EX_INFOTIP = 0x00000400,
      LVS_EX_UNDERLINEHOT = 0x00000800,
      LVS_EX_UNDERLINECOLD = 0x00001000,
      LVS_EX_MULTIWORKAREAS = 0x00002000,
   }

   enum {
      LVSIL_NORMAL = 0,
      LVSIL_SMALL = 1,
      LVSIL_STATE = 2,
   }

   enum : uint {
      TCM_FIRST = 0x1300,

      TCM_DELETEITEM = TCM_FIRST + 8,
      TCM_DELETEALLITEMS = TCM_FIRST + 9,
      TCM_GETITEMRECT = TCM_FIRST + 10,
      TCM_GETCURSEL = TCM_FIRST + 11,
      TCM_SETCURSEL = TCM_FIRST + 12,
      TCM_ADJUSTRECT = TCM_FIRST + 40,
      TCM_SETITEMSIZE = TCM_FIRST + 41,
      TCM_SETPADDING = TCM_FIRST + 43,
      TCM_GETROWCOUNT = TCM_FIRST + 44,
      TCM_SETTOOLTIPS = TCM_FIRST + 46,
      TCM_SETITEMW = TCM_FIRST + 61,
      TCM_SETIMAGELIST = TCM_FIRST + 3,
      TCM_INSERTITEMW = TCM_FIRST + 62,//TCM_SETITEMA 		 = TCM_FIRST + 6,
      //TCM_INSERTITEMA  	 = TCM_FIRST + 7,
      //TCM_SETITEMEXTRA 	 = TCM_FIRST + 14,
   }

   enum : uint {
      TCIF_TEXT = 0x0001,
      TCIF_IMAGE = 0x0002,
      TCIF_RTLREADING = 0x0004,
      TCIF_PARAM = 0x0008,
   }

   enum : uint {
      TCS_FORCEICONLEFT = 0x0010,
      TCS_FORCELABELLEFT = 0x0020,
      TCS_TABS = 0x0000,
      TCS_BUTTONS = 0x0100,
      TCS_SINGLELINE = 0x0000,
      TCS_MULTILINE = 0x0200,
      TCS_RIGHTJUSTIFY = 0x0000,
      TCS_FIXEDWIDTH = 0x0400,
      TCS_RAGGEDRIGHT = 0x0800,
      TCS_FOCUSONBUTTONDOWN = 0x1000,
      TCS_OWNERDRAWFIXED = 0x2000,
      TCS_TOOLTIPS = 0x4000,
      TCS_FOCUSNEVER = 0x8000,

      // Internet Explorer 3+
      TCS_SCROLLOPPOSITE = 0x0001,
      TCS_BOTTOM = 0x0002,
      TCS_RIGHT = 0x0002,
      TCS_MULTISELECT = 0x0004,
      TCS_HOTTRACK = 0x0040,
      TCS_VERTICAL = 0x0080,

      // Internet Explorer 4+
      TCS_FLATBUTTONS = 0x0008,
   }

   enum : uint {
      TCN_FIRST = cast(uint)-550,

      TCN_SELCHANGE = TCN_FIRST - 1,
      TCN_SELCHANGING = TCN_FIRST - 2,
   }

   enum : uint {
      NIF_MESSAGE = 0x00000001,
      NIF_ICON = 0x00000002,
      NIF_TIP = 0x00000004,
   }

   enum : uint {
      NIM_ADD = 0x00000000,
      NIM_MODIFY = 0x00000001,
      NIM_DELETE = 0x00000002,
   }

   enum : uint {
      SIF_RANGE = 0x0001,
      SIF_PAGE = 0x0002,
      SIF_POS = 0x0004,
      SIF_DISABLENOSCROLL = 0x0008,
      SIF_ALL = 23,
   }

   enum : int {
      SM_SWAPBUTTON = 23,
      SM_CXFRAME = 32,
      SM_CYFRAME = 33,
      SM_CXSMICON = 49,
      SM_CYSMICON = 50,
      SM_CYSMCAPTION = 51,
      SM_CXSIZEFRAME = SM_CXFRAME,
      SM_CYSIZEFRAME = SM_CYFRAME,
      SM_CYMENU = 15,
      SM_CXVSCROLL = 2,
      SM_CYHSCROLL = 3,
   }

   enum : uint {
      LR_DEFAULTCOLOR = 0,
      LR_MONOCHROME = 1,
      LR_COLOR = 2,
      LR_COPYRETURNORG = 4,
      LR_COPYDELETEORG = 8,
      LR_LOADTRANSPARENT = 32,
      LR_LOADREALSIZE = 128,
      LR_LOADMAP3DCOLORS = 4096,
      LR_CREATEDIBSECTION = 8192,
      LR_COPYFROMRESOURCE = 16384,
      LR_LOADFROMFILE = 0x0010,
      LR_DEFAULTSIZE = 0x0040,
      LR_SHARED = 0x8000,
   }

   enum : COLORREF {
      CLR_INVALID = 0xFFFFFFFF,
      CLR_NONE = CLR_INVALID,
   }

   enum : uint {
      DT_TOP = 0x00000000,
      DT_LEFT = 0x00000000,
      DT_CENTER = 0x00000001,
      DT_RIGHT = 0x00000002,
      DT_VCENTER = 0x00000004,
      DT_BOTTOM = 0x00000008,
      DT_WORDBREAK = 0x00000010,
      DT_SINGLELINE = 0x00000020,
      DT_EXPANDTABS = 0x00000040,
      DT_TABSTOP = 0x00000080,
      DT_NOCLIP = 0x00000100,
      DT_EXTERNALLEADING = 0x00000200,
      DT_CALCRECT = 0x00000400,
      DT_NOPREFIX = 0x00000800,
      DT_INTERNAL = 0x00001000,
      DT_EDITCONTROL = 0x00002000,
      DT_PATH_ELLIPSIS = 0x00004000,
      DT_END_ELLIPSIS = 0x00008000,
      DT_MODIFYSTRING = 0x00010000,
      DT_RTLREADING = 0x00020000,
      DT_WORD_ELLIPSIS = 0x00040000,
   }

   enum {
      TRANSPARENT = 1,
      OPAQUE = 2,
   }

   enum : uint {
      ETO_OPAQUE = 0x0002,
      ETO_CLIPPED = 0x0004,
   }

   enum : uint {
      PS_SOLID = 0,
      PS_DASH = 1,
      PS_DOT = 2,
      PS_DASHDOT = 3,
      PS_DASHDOTDOT = 4,
      PS_NULL = 5,
      PS_INSIDEFRAME = 6,
   }

   enum : uint {
      IMAGE_BITMAP = 0,
      IMAGE_ICON = 1,
      IMAGE_CURSOR = 2,
   }

   const LPWSTR IDI_ERROR = MAKEINTRESOURCEW(32513);
   const LPWSTR IDI_QUESTION = MAKEINTRESOURCEW(32514);
   const LPWSTR IDI_WARNING = MAKEINTRESOURCEW(32515);
   const LPWSTR IDI_ASTERISK = MAKEINTRESOURCEW(32516);
   const LPWSTR IDI_INFORMATION = IDI_ASTERISK;

   const LPCWSTR RT_BITMAP = MAKEINTRESOURCEW(2);
   const LPCWSTR RT_ICON = MAKEINTRESOURCEW(3);
   const LPCWSTR RT_MENU = MAKEINTRESOURCEW(4);
   const LPCWSTR RT_DIALOG = MAKEINTRESOURCEW(5);
   const LPCWSTR RT_STRING = MAKEINTRESOURCEW(6);
   const LPCWSTR RT_FONTDIR = MAKEINTRESOURCEW(7);
   const LPCWSTR RT_ACCELERATOR = MAKEINTRESOURCEW(9);
   const LPCWSTR RT_RCDATA = MAKEINTRESOURCEW(10);
   const LPCWSTR RT_MESSAGETABLE = MAKEINTRESOURCEW(11);
   const LPCWSTR RT_VERSION = MAKEINTRESOURCEW(16);
   const LPCWSTR RT_DLGINCLUDE = MAKEINTRESOURCEW(17);
   const LPCWSTR RT_PLUGPLAY = MAKEINTRESOURCEW(19);
   const LPCWSTR RT_VXD = MAKEINTRESOURCEW(20);
   const LPCWSTR RT_ANICURSOR = MAKEINTRESOURCEW(21);
   const LPCWSTR RT_ANIICON = MAKEINTRESOURCEW(22);
   const LPCWSTR RT_HTML = MAKEINTRESOURCEW(23);
   const LPCWSTR RT_MANIFEST = MAKEINTRESOURCEW(24);

   enum : LONG {
      HS_HORIZONTAL = 0,
      HS_VERTICAL = 1,
      HS_FDIAGONAL = 2,
      HS_BDIAGONAL = 3,
      HS_CROSS = 4,
      HS_DIAGCROSS = 5,
   }

   enum : uint {
      // Internet Explorer 3+
      ICC_LISTVIEW_CLASSES = 0x00000001,
      ICC_TREEVIEW_CLASSES = 0x00000002,
      ICC_BAR_CLASSES = 0x00000004, // ToolBar/StatusBar/TrackBar
      ICC_TAB_CLASSES = 0x00000008,
      ICC_UPDOWN_CLASS = 0x00000010,
      ICC_PROGRESS_CLASS = 0x00000020,
      ICC_HOTKEY_CLASS = 0x00000040,
      ICC_ANIMATE_CLASS = 0x00000080,
      ICC_WIN95_CLASSES = 0x000000FF,
      ICC_DATE_CLASSES = 0x00000100,
      ICC_USEREX_CLASSES = 0x00000200,
      ICC_COOL_CLASSES = 0x00000400,

      ICC_STANDARD_CLASSES = 0x00004000,

      // IE4+
      ICC_INTERNET_CLASSES = 0x00000800,
      ICC_PAGESCROLLER_CLASS = 0x00001000,
      ICC_NATIVEFNTCTL_CLASS = 0x00002000,
   }

   enum : uint {
      PBS_SMOOTH = 0x01,
      PBS_VERTICAL = 0x04,
      PBS_MARQUEE = 0x08,
      PBS_SMOOTHREVERSE = 0x10,
   }

   enum : uint {
      PBM_SETRANGE = WM_USER + 1,
      PBM_SETPOS = WM_USER + 2,
      PBM_DELTAPOS = WM_USER + 3,
      PBM_SETSTEP = WM_USER + 4,
      PBM_STEPIT = WM_USER + 5,
      PBM_SETMARQUEE = WM_USER + 10,
      PBM_SETRANGE32 = 1030,
      PBM_GETRANGE = 1031,
      PBM_GETPOS = 1032,
      PBM_SETBARCOLOR = 1033,
   }

   enum : uint {
      BIF_RETURNONLYFSDIRS = 0x0001,
      BIF_NEWDIALOGSTYLE = 0x0040,
      BIF_NONEWFOLDERBUTTON = 0x0200, // Shell32.dll 6.0+
   }

   enum {
      ILD_NORMAL = 0,
      LF_FACESIZE = 32,
   }

   enum : uint {
      ILC_COLOR4 = 0x0004,
      ILC_COLOR8 = 0x0008,
      ILC_COLOR16 = 0x0010,
      ILC_COLOR24 = 0x0018,
      ILC_COLOR32 = 0x0020,
      ILC_MASK = 0x0001,
   }

   enum : uint {
      TBSTYLE_BUTTON = 0x00,
      TBSTYLE_SEP = 0x01,
      TBSTYLE_CHECK = 0x02,
      TBSTYLE_GROUP = 0x04,
      TBSTYLE_DROPDOWN = 0x08,
      TBSTYLE_AUTOSIZE = 0x10,
      TBSTYLE_WRAPABLE = 0x200,
      TBSTYLE_FLAT = 0x800,
      TBSTYLE_LIST = 0x1000,

      TBSTYLE_EX_DRAWDDARROWS = 0x00000001,

      BTNS_BUTTON = TBSTYLE_BUTTON,
      BTNS_SEP = TBSTYLE_SEP,
      BTNS_CHECK = TBSTYLE_CHECK,
      BTNS_GROUP = TBSTYLE_GROUP,
      BTNS_DROPDOWN = TBSTYLE_DROPDOWN,
      BTNS_AUTOSIZE = TBSTYLE_AUTOSIZE,
      BTNS_WHOLEDROPDOWN = 0x0080,
      BTNS_SHOWTEXT = 0x0040,
   }

   enum : BYTE {
      TBSTATE_CHECKED = 0x01,
      TBSTATE_PRESSED = 0x02,
      TBSTATE_ENABLED = 0x04,
      TBSTATE_HIDDEN = 0x08,
      TBSTATE_INDETERMINATE = 0x10,
      TBSTATE_WRAP = 0x20,
      TBSTATE_ELLIPSES = 0x40,
      TBSTATE_MARKED = 0x80,
   }

   enum : LRESULT {
      TBDDRET_DEFAULT = 0,
      TBDDRET_NODEFAULT = 1,
      TBDDRET_TREATPRESSED = 2,
   }

   enum : uint {
      TBIF_IMAGE = 1,
      TBIF_TEXT = 2,
      TBIF_STATE = 4,
      TBIF_STYLE = 8,
      TBIF_LPARAM = 16,
      TBIF_COMMAND = 32,
      TBIF_SIZE = 64,
      TBIF_BYINDEX = 0x80000000,
   }

   enum : uint {
      TB_SETSTATE = WM_USER + 17,
      TB_DELETEBUTTON = WM_USER + 22,
      TB_GETITEMRECT = WM_USER + 29,
      TB_BUTTONSTRUCTSIZE = WM_USER + 30,
      TB_SETBUTTONSIZE = WM_USER + 31,
      TB_AUTOSIZE = WM_USER + 33,
      TB_SETIMAGELIST = WM_USER + 48,
      TB_INSERTBUTTONW = WM_USER + 67,
      TB_ADDBUTTONSW = WM_USER + 68,
      TB_SETPADDING = WM_USER + 87,
      TB_GETBUTTONINFOW = WM_USER + 63,
      TB_SETBUTTONINFOW = WM_USER + 64,
      TB_HITTEST = WM_USER + 69,
      TB_GETBUTTONSIZE = WM_USER + 58,
      TB_SETEXTENDEDSTYLE = WM_USER + 84,
      TB_GETEXTENDEDSTYLE = WM_USER + 85,//TB_ADDBUTTONSA 	= WM_USER + 20,
      //TB_INSERTBUTTONA 	= WM_USER + 21,
      //TB_GETBUTTONINFOA = WM_USER + 65,
      //TB_SETBUTTONINFOA = WM_USER + 66,
   }

   enum : uint {
      CC_RGBINIT = 0x00000001,
      CC_FULLOPEN = 0x00000002,
      CC_PREVENTFULLOPEN = 0x00000004,
      CC_SHOWHELP = 0x00000008,
      CC_ENABLEHOOK = 0x00000010,
      CC_ENABLETEMPLATE = 0x00000020,
      CC_ENABLETEMPLATEHANDLE = 0x00000040,
      CC_SOLIDCOLOR = 0x00000080,
      CC_ANYCOLOR = 0x00000100,
   }

   enum : uint {
      TBN_FIRST = cast(uint)-700,
      TBN_DROPDOWN = TBN_FIRST - 10,
   }

   struct WNDCLASSEXW {
      UINT cbSize;
      UINT style;
      WNDPROC lpfnWndProc;
      int cbClsExtra;
      int cbWndExtra;
      HINSTANCE hInstance;
      HICON hIcon;
      HCURSOR hCursor;
      HBRUSH hbrBackground;
      LPCWSTR lpszMenuName;
      LPCWSTR lpszClassName;
      HICON hIconSm;
   }

   align(1) struct TEXTMETRICW {
      LONG tmHeight;
      LONG tmAscent;
      LONG tmDescent;
      LONG tmInternalLeading;
      LONG tmExternalLeading;
      LONG tmAveCharWidth;
      LONG tmMaxCharWidth;
      LONG tmWeight;
      LONG tmOverhang;
      LONG tmDigitizedAspectX;
      LONG tmDigitizedAspectY;
      wchar tmFirstChar;
      wchar tmLastChar;
      wchar tmDefaultChar;
      wchar tmBreakChar;
      BYTE tmItalic;
      BYTE tmUnderlined;
      BYTE tmStruckOut;
      BYTE tmPitchAndFamily;
      BYTE tmCharSet;
   }

   struct SIZE {
      LONG cx;
      LONG cy;
   }

   struct NMMOUSE {
      NMHDR hdr;
      DWORD dwItemSpec;
      DWORD dwItemData;
      POINT pt;
      LPARAM dwHitInfo;
   }

   struct TCITEMHEADERW {
      UINT mask;
      UINT lpReserved1;
      UINT lpReserved2;
      LPCWSTR pszText;
      int cchTextMax;
      int iImage;
   }

   struct TRIVERTEX {
      LONG x;
      LONG y;
      ushort Red;
      ushort Green;
      ushort Blue;
      ushort Alpha;
   }

   struct GRADIENT_TRIANGLE {
      ULONG Vertex1;
      ULONG Vertex2;
      ULONG Vertex3;
   }

   struct GRADIENT_RECT {
      ULONG UpperLeft;
      ULONG LowerRight;
   }

   struct ACTCTXW {
      ULONG cbSize;
      DWORD dwFlags;
      LPCWSTR lpSource;
      USHORT wProcessorArchitecture;
      LANGID wLangId;
      LPCWSTR lpAssemblyDirectory;
      LPCWSTR lpResourceName;
      LPCWSTR lpApplicationName;
      HMODULE hModule;
   }

   struct OSVERSIONINFOW {
      DWORD dwOSVersionInfoSize;
      DWORD dwMajorVersion;
      DWORD dwMinorVersion;
      DWORD dwBuildNumber;
      DWORD dwPlatformId;
      wchar[128] szCSDVersion;
   }

   struct WINDOWPOS {
      HWND hwnd;
      HWND hwndInsertAfter;
      int x;
      int y;
      int cx;
      int cy;
      UINT flags;
   }

   struct WINDOWINFO {
      DWORD cbSize;
      RECT rcWindow;
      RECT rcClient;
      DWORD dwStyle;
      DWORD dwExStyle;
      DWORD dwWindowStatus;
      UINT cxWindowBorders;
      UINT cyWindowBorders;
      ATOM atomWindowType;
      WORD wCreatorVersion;
   }

   struct COMBOBOXEXITEMW {
      UINT mask;
      int iItem;
      LPCWSTR pszText;
      int cchTextMax;
      int iImage;
      int iSelectedImage;
      int iOverlay;
      int iIndent;
      LPARAM lParam;
   }

   struct BLENDFUNCTION {
      BYTE BlendOp;
      BYTE BlendFlags;
      BYTE SourceConstantAlpha;
      BYTE AlphaFormat;
   }

   struct NOTIFYICONDATA {
      DWORD cbSize;
      HWND hWnd;
      UINT uID;
      UINT uFlags;
      UINT uCallbackMessage;
      HICON hIcon;
      char[64] szTip;
   }

   struct SHITEMID {
   align(1):
      USHORT cb; // Size including cb.
      BYTE[1] abID;
   }

   struct ITEMIDLIST {
      SHITEMID mkid;
   }

   struct BROWSEINFOW {
      HWND hwndOwner;
      ITEMIDLIST* pidlRoot;
      LPWSTR pszDisplayName;
      LPCWSTR lpszTitle;
      UINT ulFlags;
      BFFCALLBACK lpfn;
      LPARAM lParam;
      int iImage;
   }

   struct LOGBRUSH {
      UINT lbStyle;
      COLORREF lbColor;
      LONG lbHatch;
   }

   struct DRAWTEXTPARAMS {
      UINT cbSize;
      int iTabLength;
      int iLeftMargin;
      int iRightMargin;
      UINT uiLengthDrawn;
   }

   struct NMHDR {
      HWND hwndFrom;
      UINT idFrom;
      UINT code;
   }

   struct NMCUSTOMDRAW {
      NMHDR hdr;
      DWORD dwDrawStage;
      HDC hdc;
      RECT rc;
      DWORD dwItemSpec;
      UINT uItemState;
      LPARAM lItemlParam;
   }

   struct NMTVCUSTOMDRAW {
      NMCUSTOMDRAW nmcd;
      COLORREF clrText;
      COLORREF clrTextBk;
      int iLevel; // IE4+
   }

   struct NMLISTVIEW {
      NMHDR hdr;
      int iItem;
      int iSubItem;
      UINT uNewState;
      UINT uOldState;
      UINT uChanged;
      POINT ptAction;
      LPARAM lParam;
   }

   struct LVITEMW {
      UINT mask;
      int iItem;
      int iSubItem;
      UINT state;
      UINT stateMask;
      LPCWSTR pszText;
      int cchTextMax;
      int iImage;
      LPARAM lParam;
   }

   align(1) struct NMTTDISPINFOW {
      NMHDR hdr;
      wchar* lpszText;
      wchar[80] szText;
      HINSTANCE hinst;
      UINT uFlags;
      LPARAM lParam;
   }

   struct LVDISPINFOW {
      NMHDR hdr;
      LVITEMW item;
   }

   struct LVCOLUMNW {
      UINT mask;
      int fmt;
      int cx;
      LPCWSTR pszText;
      int cchTextMax;
      int iSubItem;
   }

   struct TBBUTTON {
      int iBitmap;
      int idCommand;
      BYTE fsState;
      BYTE fsStyle;
      BYTE[2] bReserved;
      DWORD dwData;
      int iString;
   }

   struct NMTOOLBARW {
      NMHDR hdr;
      int iItem;
      TBBUTTON tbButton;
      int cchText;
      LPWSTR pszText;
      RECT rcButton;
   }

   struct TVITEMW {
      UINT mask;
      HTREEITEM hItem;
      UINT state;
      UINT stateMask;
      LPCWSTR pszText;
      int cchTextMax;
      int iImage;
      int iSelectedImage;
      int cChildren;
      LPARAM lParam;
   }

   struct TVHITTESTINFO {
      POINT pt;
      UINT flags;
      HTREEITEM hItem;
   }

   struct TVINSERTSTRUCTW {
      HTREEITEM hParent;
      HTREEITEM hInsertAfter;
      TVITEMW item;
   }

   struct NMTREEVIEWW {
      NMHDR hdr;
      UINT action;
      TVITEMW itemOld;
      TVITEMW itemNew;
      POINT ptDrag;
   }

   struct NMTVDISPINFOW {
      NMHDR hdr;
      TVITEMW item;
   }

   struct TCITEMW {
      UINT mask;
      UINT lpReserved1;
      UINT lpReserved2;
      LPCTSTR pszText;
      int cchTextMax;
      int iImage;
      LPARAM lParam;
   }

   // Rich edit.
   struct CHARRANGE {
      LONG cpMin;
      LONG cpMax;
   }

   // Rich edit.
   struct EDITSTREAM {
      /+ DWORD_PTR +/
      DWORD dwCookie;
      DWORD dwError;
      EDITSTREAMCALLBACK pfnCallback;
   }

   struct TEXTRANGEA {
      CHARRANGE chrg;
      LPSTR lpstrText;
   }

   struct MENUITEMINFOW {
      UINT cbSize;
      UINT fMask;
      UINT fType;
      UINT fState;
      UINT wID;
      HMENU hSubMenu;
      HBITMAP hbmpChecked;
      HBITMAP hbmpUnchecked;
      DWORD dwItemData;
      LPCWSTR dwTypeData;
      UINT cch;
      HBITMAP hbmpItem;
   }

   struct SCROLLINFO {
      UINT cbSize;
      UINT fMask;
      int nMin;
      int nMax;
      UINT nPage;
      int nPos;
      int nTrackPos;
   }

   struct TBBUTTONINFOW {
      UINT cbSize;
      DWORD dwMask;
      int idCommand;
      int iImage;
      BYTE fsState;
      BYTE fsStyle;
      WORD cx;
      DWORD lParam;
      LPWSTR pszText;
      int cchText;
   }

   align(1) struct CHOOSECOLORW {
      DWORD lStructSize;
      HWND hwndOwner;
      HWND hInstance;
      COLORREF rgbResult;
      COLORREF* lpCustColors;
      DWORD Flags;
      LPARAM lCustData;
      LPCCHOOKPROC lpfnHook;
      LPCWSTR lpTemplateName;
   }

   struct LOGFONTW {
      LONG lfHeight;
      LONG lfWidth;
      LONG lfEscapement;
      LONG lfOrientation;
      LONG lfWeight;
      BYTE lfItalic;
      BYTE lfUnderline;
      BYTE lfStrikeOut;
      BYTE lfCharSet;
      BYTE lfOutPrecision;
      BYTE lfClipPrecision;
      BYTE lfQuality;
      BYTE lfPitchAndFamily;
      WCHAR[LF_FACESIZE] lfFaceName;
   }

   struct NONCLIENTMETRICSW {
      UINT cbSize;
      int iBorderWidth;
      int iScrollWidth;
      int iScrollHeight;
      int iCaptionWidth;
      int iCaptionHeight;
      LOGFONTW lfCaptionFont;
      int iSmCaptionWidth;
      int iSmCaptionHeight;
      LOGFONTW lfSmCaptionFont;
      int iMenuWidth;
      int iMenuHeight;
      LOGFONTW lfMenuFont;
      LOGFONTW lfStatusFont;
      LOGFONTW lfMessageFont;
   }

   align(1) struct CHOOSEFONTW {
      DWORD lStructSize;
      HWND hwndOwner;
      HDC hDC;
      LOGFONTW* lpLogFont;
      INT iPointSize;
      DWORD Flags;
      DWORD rgbColors;
      LPARAM lCustData;
      LPCFHOOKPROC lpfnHook;
      LPCWSTR lpTemplateName;
      HINSTANCE hInstance;
      LPWSTR lpszStyle;
      WORD nFontType;
      WORD ___MISSING_ALIGNMENT__;
      INT nSizeMin;
      INT nSizeMax;
   }

   struct ICONINFO {
      BOOL fIcon;
      DWORD xHotspot;
      DWORD yHotspot;
      HBITMAP hbmMask;
      HBITMAP hbmColor;
   }

   struct CREATESTRUCTW {
      LPVOID lpCreateParams;
      HINSTANCE hInstance;
      HMENU hMenu;
      HWND hwndParent;
      int cy;
      int cx;
      int y;
      int x;
      LONG style;
      LPCWSTR lpszName;
      LPCWSTR lpszClass;
      DWORD dwExStyle;
   }

   struct TOOLINFOW {
      UINT cbSize;
      UINT uFlags;
      HWND hwnd;
      UINT uId;
      RECT rect;
      HINSTANCE hinst;
      LPWSTR lpszText;
      LPARAM lParam;
      //void* lpReserved; <-- From XP/Vista/7
   }

   struct TRACKMOUSEEVENT {
      DWORD cbSize;
      DWORD dwFlags;
      HWND hwndTrack;
      DWORD dwHoverTime;
   }

   struct DRAWITEMSTRUCT {
      UINT CtlType;
      UINT CtlID;
      UINT itemID;
      UINT itemAction;
      UINT itemState;
      HWND hwndItem;
      HDC hDC;
      RECT rcItem;
      DWORD itemData;
   }

   struct MEASUREITEMSTRUCT {
      UINT CtlType;
      UINT CtlID;
      UINT itemID;
      UINT itemWidth;
      UINT itemHeight;
      DWORD itemData;
   }

   struct INITCOMMONCONTROLSEX {
      DWORD dwSize;
      DWORD dwICC;
   }

   struct MENUINFO {
      DWORD cbSize;
      DWORD fMask;
      DWORD dwStyle;
      UINT cyMax;
      HBRUSH hbrBack;
      DWORD dwContextHelpID;
      ULONG_PTR dwMenuData;
   }

   /* *** Win32 Macros *** */
   COLORREF RGB(int r, int g, int b) {
      return cast(COLORREF)(cast(ubyte)r | (cast(ubyte)g << 8) | (cast(ubyte)b << 16));
   }

   DWORD MAKELONG(int wLow, int wHigh) {
      return cast(DWORD)cast(WORD)wLow | (cast(DWORD)cast(WORD)wHigh << 16);
   }

   LPWSTR MAKEINTRESOURCEW(ushort id) {
      return (cast(LPWSTR)(cast(ULONG_PTR)((cast(WORD)(id)))));
   }

   BYTE GetRValue(COLORREF c) {
      return cast(BYTE)c;
   }

   BYTE GetGValue(COLORREF c) {
      return cast(BYTE)(c >> 8);
   }

   BYTE GetBValue(COLORREF c) {
      return cast(BYTE)(c >> 16);
   }

   short GetWheelDelta(WPARAM wParam) {
      return cast(short)HIWORD(wParam);
   }

   alias GUID CLSID;
   alias DWORD function( /+ DWORD_PTR +/ DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG* pcb) EDITSTREAMCALLBACK; // Rich edit.
   alias int function(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData) BFFCALLBACK;
   alias UINT function(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) LPCCHOOKPROC;
   alias UINT function(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) LPCFHOOKPROC;
   alias BOOL function(HDC hdc, LPARAM lpData, int cchData) GRAYSTRINGPROC;

   alias MAKELONG MAKELRESULT;
   alias MAKELONG MAKELPARAM;
   alias MAKELONG MAKEWPARAM;
   alias TBBUTTON TB_BUTTON;
   alias HANDLE HIMAGELIST;
   alias size_t ULONG_PTR;
   alias HANDLE HTREEITEM;
   alias WORD CLIPFORMAT;
   alias ulong DWORDLONG;
   alias long LONGLONG;
   alias WORD LANGID;
   alias DWORD LCID;
   alias DWORD HDWP;
   alias DWORD ARGB;

   /* *** Shell32.lib *** */
   ITEMIDLIST* SHBrowseForFolderW(BROWSEINFOW* lpbi);
   BOOL SHGetPathFromIDListW(ITEMIDLIST* pidl, wchar* pszPath);
   HICON ExtractAssociatedIconW(HINSTANCE hInst, LPCWSTR lpIconPath, WORD* lpiIcon);

   /* *** Comdlg32 *** */
   BOOL ChooseColorW(CHOOSECOLORW* lpcc);
   BOOL ChooseFontW(CHOOSEFONTW* lpcf);

   /* *** Kernel32.dll *** */
   HMODULE LoadLibraryW(LPCWSTR lpFileName);
   HMODULE GetModuleHandleW(LPCWSTR lpModuleName);
   DWORD GetModuleFileNameW(HMODULE hModule, LPWSTR lpFilename, DWORD nSize);
   HRSRC FindResourceExW(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, WORD wLanguage);
   BOOL GetVersionExW(OSVERSIONINFOW* lpVersionInfo);
   DWORD GetTempPathW(DWORD nBufferLength, LPWSTR lpBuffer);
   HGLOBAL LoadResource(HMODULE hModule, HRSRC hResInfo);
   DWORD SizeofResource(HMODULE hModule, HRSRC hResInfo);
   BOOL TerminateProcess(HANDLE, UINT);
   VOID ExitProcess(UINT uExitCode);
   int MulDiv(int nNumber, int nNumerator, int nDenominator);

   /* *** User32.dll *** */
   int MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
   BOOL GetMessageW(MSG* lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
   LRESULT DispatchMessageW(MSG* lpmsg);
   HWND CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName,
         DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent,
         HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
   HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x,
         int y, int cx, int cy, UINT uFlags);
   //LRESULT SendMessageW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
   HANDLE LoadImageW(HINSTANCE hinst, LPCWSTR lpszName, UINT uType, int cxDesired,
         int cyDesired, UINT fuLoad);
   LRESULT CallWindowProcA(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
   LRESULT CallWindowProcW(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
   BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
   BOOL GetTextExtentPoint32W(HDC hdc, LPCWSTR lpString, int c, SIZE* lpSize);
   BOOL DrawFrameControl(HDC hdc, RECT* lprc, uint uType, uint uState);
   BOOL SetMenuItemInfoW(HMENU hMenu, UINT uItem, BOOL fByPosition, MENUITEMINFOW* lpmii);
   BOOL InsertMenuItemW(HMENU hMenu, UINT uItem, BOOL fByPosition, MENUITEMINFOW* lpmii);
   BOOL SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni);
   UINT SetTimer(HWND hWnd, UINT nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc);
   BOOL GetClassInfoExW(HINSTANCE hinst, LPCWSTR lpszClass, WNDCLASSEXW* lpwcx);
   LRESULT DefWindowProcW(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
   int SetScrollInfo(HWND hwnd, int fnBar, SCROLLINFO* lpsi, BOOL fRedraw);
   BOOL EnableMenuItem(HMENU hMenu, UINT uIDEnableItem, UINT uEnable);
   int GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount);
   BOOL GetScrollInfo(HWND hwnd, int fnBar, SCROLLINFO* lpsi);
   LONG SetWindowLongW(HWND hWnd, int nIndex, LONG dwNewLong);
   DWORD SetClassLongW(HWND hWnd, int nIndex, LONG lNewLong);
   BOOL GetMenuItemInfoW(HMENU, UINT, BOOL, MENUITEMINFOW*);
   BOOL TrackMouseEvent(TRACKMOUSEEVENT* lpEventTrack);
   HWND SetParent(HWND hWndChild, HWND hWndNewParent);
   BOOL SetWindowTextW(HWND hWnd, LPCWSTR lpString);
   BOOL GetWindowInfo(HWND hwnd, WINDOWINFO* pwi);
   BOOL IsDialogMessageW(HWND hDlg, LPMSG lpMsg);
   HMENU GetSystemMenu(HWND hWnd, BOOL bRevert);
   LONG GetWindowLongW(HWND hWnd, int nIndex);
   BOOL EnableWindow(HWND hWnd, BOOL bEnable);
   DWORD GetClassLongW(HWND hWnd, int nIndex);
   ATOM RegisterClassExW(WNDCLASSEXW* lpwcx);
   HDWP BeginDeferWindowPos(int nNumWindows);
   BOOL EndDeferWindowPos(HDWP hWinPosInfo);
   BOOL KillTimer(HWND hWnd, UINT uIDEvent);
   BOOL DrawFocusRect(HDC hDC, RECT* lprc);
   BOOL OpenClipboard(HWND hWndNewOwner);
   BOOL SetMenu(HWND hWnd, HMENU hMenu);
   int GetWindowTextLengthW(HWND hWnd);
   BOOL SetMenuInfo(HMENU, MENUINFO*);
   BOOL DeleteMenu(HMENU, UINT, UINT);
   SHORT GetAsyncKeyState(int vKey);
   //BOOL BringWindowToTop(HWND hWnd);
   BOOL IsWindowVisible(HWND hWnd);
   BOOL IsWindowEnabled(HWND hWnd);
   BOOL IsWindowUnicode(HWND hWnd);
   DWORD GetSysColor(int nIndex);
   HBRUSH GetSysColorBrush(int nIndex);
   BOOL DestroyWindow(HWND hwnd);
   BOOL CloseWindow(HWND hWnd);
   BOOL DestroyMenu(HMENU hMenu);
   BOOL DrawMenuBar(HWND hWnd);
   HWND SetCapture(HWND hWnd);
   HWND GetParent(HWND hWnd);
   BOOL IsWindow(HWND hWnd);
   BOOL IsMenu(HMENU hMenu);
   HMENU GetMenu(HWND hWnd);
   HWND GetDesktopWindow();
   HMENU CreatePopupMenu();
   HWND GetActiveWindow();
   BOOL EmptyClipboard();
   BOOL ReleaseCapture();
   //BOOL WaitMessage();
   HMENU CreateMenu();
   //HWND GetCapture();

   /* *** Comctl32.dll *** */
   //BOOL ImageList_DrawEx(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, int dx, int dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle);
   //BOOL ImageList_Draw(HIMAGELIST himl, int i, HDC hdcDst, int x, int y, UINT fStyle);
   //HIMAGELIST ImageList_Create(int cx, int cy, UINT flags, int cInitial, int cGrow);
   //int ImageList_AddMasked(HIMAGELIST himl, HBITMAP hbmImage, COLORREF crMask);
   //int ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask);
   BOOL InitCommonControlsEx(INITCOMMONCONTROLSEX* lpInitCtrls);
   COLORREF ImageList_SetBkColor(HIMAGELIST, COLORREF);
   int ImageList_AddIcon(HIMAGELIST himl, HICON hicon);
   int ImageList_ReplaceIcon(HIMAGELIST, int, HICON);
   BOOL ImageList_Remove(HIMAGELIST himl, int i);
   BOOL ImageList_Destroy(HIMAGELIST himl);

   /* *** Gdi32.dll *** */
   //BOOL GdiTransparentBlt(HDC hdcDest, int xoriginDest, int yoriginDest,int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, UINT crTransparent);
   //BOOL GdiAlphaBlend(HDC hdcDest, int xoriginDest, int yoriginDest, int wDest, int hDest, HDC hdcSrc, int xoriginSrc, int yoriginSrc, int wSrc, int hSrc, BLENDFUNCTION ftn);
   BOOL DrawIconEx(HDC hdc, int xLeft, int yTop, HICON hIcon, int cxWidth,
         int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags);
   BOOL PlgBlt(HDC hdcDest, POINT* lpPoint, HDC hdcSrc, int nXSrc, int nYSrc,
         int nWidth, int nHeight, HBITMAP hbmMask, int xMask, int yMask);
   BOOL BitBlt(HDC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight,
         HDC hdcSrc, int nXSrc, int nYSrc, DWORD dwRop);
   int GetDIBits(HDC hdc, HBITMAP hbmp, UINT uStartScan, UINT cScanLines,
         void* lpvBits, BITMAPINFO* lpbi, UINT uUsage);
   HBITMAP CreateDIBSection(HDC hdc, BITMAPINFO* pbmi, UINT iUsage,
         void** ppvBits, HANDLE hSection, DWORD dwOffset);
   int DrawTextExW(HDC hdc, LPCWSTR lpchText, int cchText, RECT* lprc,
         UINT dwDTFormat, DRAWTEXTPARAMS* lpDTParams);
   //BOOL GdiGradientFill(HDC hdc, TRIVERTEX* pVertex, ULONG dwNumVertex, void* pMesh, ULONG dwNumMesh, ULONG dwMode);
   HBITMAP CreateBitmap(int nWidth, int nHeight, UINT cPlanes, UINT cBitsPerPel,
         const(void*) lpvBits);
   BOOL Rectangle(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
   BOOL Ellipse(HDC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect);
   BOOL PatBlt(HDC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, DWORD dwRop);
   HBITMAP CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight);
   BOOL SetBrushOrgEx(HDC hdc, int nXOrg, int nYOrg, LPPOINT lppt);
   int GetObjectW(HGDIOBJ hgdiobj, int cbBuffer, void* lpvObject);
   BOOL GetIconInfo(HICON hIcon, ICONINFO* iconinfo);
   HBRUSH CreateHatchBrush(int ht, COLORREF crColor);
   BOOL GetTextMetricsW(HDC hdc, TEXTMETRICW* lptm);
   HBRUSH CreateSolidBrush(COLORREF crColor);
   HFONT CreateFontIndirectW(LOGFONTW* lplf);
   BOOL DrawEdge(HDC, LPRECT, UINT, UINT);
   BOOL DestroyCursor(HCURSOR hCursor);
   BOOL DestroyIcon(HICON hIcon);
   COLORREF GetTextColor(HDC hdc);

   /* *** Advapi32.dll *** */
   LONG RegCreateKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPTSTR lpClass, DWORD dwOptions, REGSAM samDesired,
         LPSECURITY_ATTRIBUTES lpSecurityAttributes, PHKEY phkResult, LPDWORD lpdwDisposition);
   LONG RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions,
         REGSAM samDesired, PHKEY phkResult);
   LONG RegQueryValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD* lpReserved,
         DWORD* lpType, BYTE* lpData, DWORD* lpcbData);
   LONG RegSetValueExW(HKEY hKey, LPCWSTR lpValueName, DWORD Reserved,
         DWORD dwType, const BYTE* lpData, DWORD cbData);
   LONG RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass,
         LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen,
         LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen,
         LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime);
   LONG RegEnumKeyExW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, LPDWORD lpcName,
         LPDWORD lpReserved, LPWSTR lpClass, LPDWORD lpcClass, PFILETIME lpftLastWriteTime);
   LONG RegEnumValueW(HKEY hKey, DWORD dwIndex, LPWSTR lpValueName, LPDWORD lpcchValueName,
         LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData);
   LONG RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName);
   LONG RegDeleteKeyW(HKEY hKey, LPCWSTR lpSubKey);

   /* *** Ole32.dll *** */
   HRESULT CLSIDFromString(wchar* lpsz, CLSID* pclsid);
}
